All Questions
Tagged with if-statementfunctions
2 questions
0votes
1answer
507views
What are the pro or cons between a if statement and two different functions [duplicate]
I was wondering what are the pro and cons between having one function with a if statement dictating 2 sections of code or two discreet functions that are called on separately. In terms of pro and ...
5votes
3answers
12kviews
Changing large number of if-elif-else statements to use underlying structure
I have a function that looks something like this: function_name(step, ... , typ): if typ == 'some type of calc method': if step == 1: do_me_at_step_1(...) elif step ...